﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QLDBHYT.VO;
using System.Data;
using System.Data.SqlClient;

namespace QLDBHYT.DAO
{
    public  class  NhomCPDAO
    {
        private dbConnection conn;
        public NhomCPDAO()
        {
            conn = new dbConnection();
        }
        public DataTable SearchAll()    
        {
            string query = string.Format("SELECT ten_nh,stt_nh FROM dbo.dmnh Dmnh where stt_nh in ('01','03')");
            SqlParameter[] sqlParameters = new SqlParameter[0];
            return conn.executeSelectQuery(query, sqlParameters);
        }
        public DataTable SearchKy()
        {
            string query = string.Format("SELECT thang,nam,ky,dauky,cuoiky FROM NT_KY order by ky desc,thang desc,nam  desc");
            SqlParameter[] sqlParameters = new SqlParameter[0];
            return conn.executeSelectQuery(query, sqlParameters);
        }
    }
}
